import {
  Column,
  CreateDateColumn,
  Entity,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';

@Entity('depart')
export class Department {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ default: true })
  enabled: boolean;
  @Column({ length: 50, comment: '部门名称' })
  name: string;
  @Column({ length: 255, nullable: true })
  description: string;
  @CreateDateColumn({ type: 'timestamp' })
  createTime: Date;
  @UpdateDateColumn({ type: 'timestamp', nullable: true })
  updateTime: Date;
}
